import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from "@/store"
import ZkTable from 'vue-table-with-tree-grid'

import VueQuillEditor from 'vue-quill-editor'

Vue.use(VueQuillEditor, /* { default global options } */ )
Vue.use(ZkTable)


Vue.filter('dateFormat', function (originval) {
    if (originval.length != 13) {
        originval = originval * 1000
    }
    const dt = new Date(originval)
    const y = dt.getFullYear()
    const m = dt.getMonth()
    const d = dt.getDate()

    const hh = dt.getHours()
    const mm = dt.getMinutes()
    const ss = dt.getSeconds()

    return `${y}/${m}/${d} ${hh}:${mm}:${ss}`
})

import '@/assets/base.css'
import '@/assets/font.css'

// 挂载echarts
Vue.prototype.$echarts = window.echarts

Vue.config.productionTip = false

window.vm = new Vue({
    render: h => h(App),
    router,
    store
}).$mount('#app')